.386
.model flat, stdcall
option casemap :none
include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
include \masm32\include\user32.inc
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\user32.lib
.stack 200
.data
__error_resta db "RESULTADO NEGATIVO EN RESTA", 0
__error_overflow db "OVERFLOW EN PRODUCTO", 0
__error db "ERROR", 0
_b dd ?
_a dd ?
_varW dd ?
_c dd ?
.code
start:
MOV eax, _b
MUL _c
JO overflow
ADD eax, _a
MOV _varW, eax
jmp fin
overflow:
invoke MessageBox, NULL, addr __error_overflow, addr __error, MB_OK
invoke ExitProcess, 0
res_negativo:
invoke MessageBox, NULL, addr __error_resta, addr __error, MB_OK
invoke ExitProcess, 0
fin:
invoke ExitProcess, 0
end start
